<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet">
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/fontawesome.css">
    <link rel="stylesheet" href="css/templatemo-style.css">
    <link rel="stylesheet" href="css/owl.css">

    <%--<link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/car.css">--%>

    <script type="text/javascript">
        function pay(orderId,money){
            parent.location.href="pay1.jsp?oid="+orderId+"&omoney="+money;
        }
        function payWeiXin(orderId,money){
            parent.location.href="payWeixin.jsp?oid="+orderId+"&omoney="+money;
        }
    </script>
</head>
<style>
    table tr>td table tr>th{
        text-align: center;
        vertical-align: middle !important;
    }
</style>
<body class="is-preload">

<!-- Wrapper -->
<div id="wrapper" class="">

    <!-- Main -->
    <div id="main">
        <div class="inner">

            <!-- Header -->
            <header id="header">
                <div class="logo">
                    <!-- <a href="index.html">Ramayana</a> -->
                </div>
            </header>

            <!-- Banner -->
            <section class="main-banner">
                <div class="container-fluid">
                    <div class="row">
                        <div class="panel panel-default" style="margin: 0 auto;width: 95%;">
                            <div class="panel-heading">
                                <h3 class="panel-title"><span class="glyphicon glyphicon-equalizer"></span>&nbsp;&nbsp;订单详情</h3>
                            </div>
                            <div class="panel-body">
                                <table cellpadding="0" cellspacing="0" align="center" width="100%" class="table table-striped table-bordered table-hover">
                                    <tr>
                                        <td>订单编号:</td>
                                        <td>${od.id}</td>
                                        <td>订单时间:</td>
                                        <td>${od.createtime}</td>
                                    </tr>
                                    <tr>
                                        <td>收件人:</td>
                                        <td>${od.name}</td>
                                        <td>联系电话:</td>
                                        <td>${od.phone}</td>
                                    </tr>
                                    <tr>
                                        <td>送货地址:</td>
                                        <td>${od.detail}</td>
                                        <td>总价:</td>
                                        <td>${od.money}</td>
                                    </tr>
                                    <tr>
                                        <td>商品列表:</td>
                                        <td colspan="3">
                                            <table align="center" cellpadding="0" cellspacing="0" width="100%"  class="table table-striped table-bordered table-hover">
                                                <tr align="center" class="info">
                                                    <th>序号</th>
                                                    <th>商品封面</th>
                                                    <th>商品名称</th>
                                                    <th>商品评分</th>
                                                    <th>商品日期</th>
                                                    <th>商品单价</th>
                                                    <th>购买数量</th>
                                                    <th>小计</th>
                                                </tr>
                                                <c:forEach items="${od.list}" var="item" varStatus="i">
                                                    <tr align="center">
                                                        <th>${i.count}</th>
                                                        <th>
                                                            <img src="./image/${item.picture}" width="50px" height="50px">
                                                        </th>
                                                        <th>${item.name}</th>
                                                        <th>${item.star}</th>
                                                        <th>${item.pubdate}</th>
                                                        <th>${item.price}</th>
                                                        <th>${item.num}</th>
                                                        <th>${item.money}</th>
                                                    </tr>
                                                </c:forEach>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="4" style="margin-right: 40px;">
                                            <a href="${pageContext.request.contextPath }/getOrderList" class="btn btn-danger btn-sm">返回订单列表</a>
                                            &nbsp;&nbsp;
                                            <c:if test="${od.flag eq 1 }">
                                                <button type="button" onclick="pay('${od.id}','${od.money}')" class="btn btn-warning btn-sm">支付</button>
                                            </c:if>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </section>


        </div>
    </div>

    <!-- Sidebar -->
    <div id="sidebar">

        <div class="inner">


            <!-- Menu -->
            <nav id="menu">
                <ul>
                    <p style="font-size:18px">个人中心</p>
                    <li><a href="myList_info.jsp">我的个人中心</a></li>
                    <li><a href="">消息通知</a></li>
                    <li><a href="userAddressShow">收货地址</a></li>
                    <li><a href="https://www.google.com">优惠券</a></li>
                    <p style="font-size:18px">订单中心</p>
                    <li><a href="getOrderList">我的订单</a></li>
                    <li><a href="">意外保</a></li>
                    <li><a href="">团购订单</a></li>
                    <li><a href="">评价晒单</a></li>
                </ul>
            </nav>


        </div>
    </div>

</div>

</body>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>

<script src="js/browser.min.js"></script>
<script src="js/breakpoints.min.js"></script>
<script src="js/transition.js"></script>
<script src="js/owl-carousel.js"></script>
<script src="js/custom.js"></script>
</html>